<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>绑定事件</title>
    <script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#textId").bind({
               mouseover:function () {
                   $(this).css("background-color","yellow");
               },
                mouseout:function () {
                    $(this).css("background-color","white")
                }
            });
        });
    </script>
</head>
<body>
      <div style="border: 3px solid red;" id="textId">
          hello text
      </div>

</body>
</html>